package org.linlinjava.litemall.admin.service;

import org.linlinjava.litemall.db.domain.LitemallOrder;
import org.linlinjava.litemall.db.domain.LitemallOrderExample;
import org.linlinjava.litemall.db.domain.LumiereSubscribeUserLogExample;
import org.linlinjava.litemall.db.service.LitemallOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * 管理litemall订单服务
 *
 * @author yliyun
 * @date 2022/09/14
 */
@Service
public class AdminLitemallOrderService {
    /**
     * litemall订单服务
     */
    @Autowired
    private LitemallOrderService litemallOrderService;



    /**
     * 更新评论
     *
     * @param orderId 订单id
     * @param remark  备注
     */
    public void updateRemark(Integer orderId,String remark){
        LitemallOrder order = new LitemallOrder();
        order.setId(orderId);
        order.setShipRemark(remark);
        litemallOrderService.updateById(order);
    }

    /**
     * 查询一个
     *
     * @param orderId 订单id
     * @return {@link LitemallOrder}
     */
    public LitemallOrder queryOne(Integer orderId){
        return litemallOrderService.findById(orderId);
    }
}
